package neu.gprs.Action;

import java.util.List;

import neu.gprs.domain.LookOverPosStatusDomain;
import neu.gprs.dto.LookOverPosStatusDto;
import neu.gprs.service.PosStatusService;

import com.opensymphony.xwork2.ActionSupport;

/**
 * @author zhu_hui
 */
public class PosStatusAction extends ActionSupport {
    /**
     * SystemID
     */
    private static final long serialVersionUID = 1L;

    private LookOverPosStatusDto conditionDto;
    private List<LookOverPosStatusDomain> domainList;
    private PosStatusService posStatusService;

    public LookOverPosStatusDto getConditionDto() {
        return conditionDto;
    }

    public void setConditionDto(LookOverPosStatusDto conditionDto) {
        this.conditionDto = conditionDto;
    }

    public void setPosStatusService(PosStatusService posStatusService) {
        this.posStatusService = posStatusService;
    }

    public List<LookOverPosStatusDomain> getDomainList() {
        return domainList;
    }

    public void setDomainList(List<LookOverPosStatusDomain> domainList) {
        this.domainList = domainList;
    }

    /**
     * excute()
     * 
     * @return SUCCESS
     * @throws Exception
     */
    public String execute() throws Exception {

        if (conditionDto != null) {
            domainList = posStatusService.getPosStatus(conditionDto);
        }
        return SUCCESS;
    }

}
